home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 12
/
CU Amiga Magazine's Super CD-ROM 12 (1997)(EMAP Images)(GB)[!][issue 1997-07].iso
/
CUCD
/
Games
/
DestructivePoker
/
sources
/
sources.lha
/
point.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-11-24
|
886b
|
43 lines
/*
Point.h
V1.00 - 031196 Kimmo Teräväinen
----- ------ ----------------
V0.10 031196 Code moved from poker/kuvio.h and generalized
*/
#ifndef DC1_POINT
#define DC1_POINT
class cItemR2 {
int x,y;
public:
cItemR2(int nx=0,int ny=0) { x=nx; y=ny; }
virtual cItemR2 &operator=(const cItemR2 &p) { x=p.x; y=p.y; return *this;}
virtual cItemR2 &operator+=(const cItemR2 &p) {
x+=p.x; y+=p.y;
return *this;
}
virtual cItemR2 &operator-=(const cItemR2 &p) {
x-=p.x; y-=p.y;
return *this;
}
int X() const { return x; }
int Y() const { return y; }
};
class cPoint : public cItemR2 {
public:
cPoint(int nx,int ny) : cItemR2(nx,ny) {}
cPoint(const cItemR2 &p) : cItemR2(p) {}
};
class cSize : public cItemR2 {
public:
cSize(int nx,int ny) : cItemR2(nx,ny) {}
cSize(const cItemR2 &p) : cItemR2(p) {}
};
#endif